﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kristall.MyGame.Scripts;
using Kristall.Engine;
using Kristall.Engine.Scripts;

namespace Kristall.Editor.Commands
{
    public class AddScriptCommand : ICommand
    {
        public string Name
        {
            get { return "Add Script"; }
        }

        AABB _aabb;
        Script _script;

        public AddScriptCommand(AABB aabb, Script script)
        {
            _aabb = aabb;
            _script = script;
        }

        public bool Execute()
        {
            _aabb.Scripts.Add(_script);
            return true;
        }

        public bool Undo()
        {
            _aabb.Scripts.Remove(_script);
            return true;
        }
    }
}
